package cn.edu.scau.cmi.zengGuanSheng.simpleFactoryPattern;

public class InsuranceFactory {

	public static Insurance getInsurance(String type) {
		switch (type) {
		case "BodyInjury":
			return new BodyInjury();
		case "CarDamage":
			return new CarDamage();
		case "Casualty":
			return new Casualty();
		case "MultipleAccidents":
			return new MultipleAccidents();
		default:
			return null;
		}
	}
}
